package com.taiji.dianthus.service.sys;

import com.taiji.dianthus.common.BusinessMessage;
import com.taiji.dianthus.domain.sys.DSysUser;
import com.taiji.dianthus.domain.sys.LogExcel;
import com.taiji.dianthus.domain.sys.SysLog;

import java.util.List;

/**
 * @InterfaceName SysLogService
 * @Description
 * @Author H.M
 * @Date 2020/6/22
 */
public interface SysLogService {


    /**
     * 保存日志方法
     *
     * @param user
     * @param operation
     * @param ipAddress
     * @param desc
     * @param result
     * @param remark
     * @return
     */
    SysLog save(DSysUser user, Integer operation, String ipAddress,
                String desc, Integer result, String remark);

    /**
     * 多条件分页查询日志列表
     *
     * @param pageSize
     * @param currentPage
     * @param userName
     * @param operation
     * @param desc
     * @param result
     * @param startDate
     * @param endDate
     * @return
     */
    BusinessMessage list(Integer pageSize, Integer currentPage, String userName, Integer operation,
                         String desc, Integer result, String startDate, String endDate, DSysUser currentUser);

    /**
     * 查询该天的登录人数
     *
     * @param dayStr
     * @return
     */
    Integer countLoginByDay(String dayStr);

    /**
     * 查询该月的登录人数
     *
     * @param monthStr
     * @return
     */
    Integer countLoginByMonth(String monthStr);

    List<LogExcel> listNoPage(String userName, Integer operation, String operationDesc, Integer result, String startDate, String endDate, DSysUser currentUser);
}
